From 6ace995b52be4f78fcd6597f73a48099d916fc80 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 18 Jan 2007 22:11:06 +0000 Subject: [PATCH] Handle leading whitespace in whitespace separated xcsv files again. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@2622 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/csv_util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gpsbabel/csv_util.c b/gpsbabel/csv_util.c index c08287475..9b85b005c 100644 --- a/gpsbabel/csv_util.c +++ b/gpsbabel/csv_util.c @@ -1008,7 +1008,10 @@ xcsv_data_read(void) while ((buff = gbfgetstr(xcsv_file.xcsvfp))) { linecount++; - buff = lrtrim(buff); + /* Whack trailing space; leading space may matter if our field sep + * is whitespace and we have leading whitespace. + */ + buff = rtrim(buff); /* skip over x many lines on the top for the prologue... */ if ((xcsv_file.prologue_lines) && ((linecount - 1) < -- 2.30.2